// 导入createStore方法创建store仓库
import { createStore } from 'redux'
// 导入reducer方法
import reducer from './reducer'


// 初始化数据
const initData = {
    currentType: 'all',
    todos: [
        {
            id: 1,
            etitle: '写代码',
            done: false,
            isEdit: false
        }, {
            id: 2,
            etitle: '去K歌',
            done: true,
            isEdit: false
        }
    ]
}


// 创建仓库，即创建唯一的数据源
const store = createStore(reducer, initData)

export default store